﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<!-- saved from url=(0061)http://169.254.158.100/zzdl/ContApply/Apply_list.asp?p_type=3 -->
<HTML>
<HEAD><TITLE>待审批合同申请一览表</TITLE>
    <!--导入vue依赖-->
    <script th:src="@{/js/vue2.js}"></script>
    <!--导入axios依赖-->
    <script th:src="@{/js/axios.js}"></script>
    <!--导入分页组件-->
    <script th:src="@{/js/vuejs-paginate.js}"></script>
    <!--导入BootStrap框架所需的三个依赖-->
    <script th:src="@{/js/jquery.min.js}"></script>
    <script th:src="@{/css/bootstrap/js/bootstrap.js}"></script>
    <link rel="stylesheet" th:href="@{/css/bootstrap/css/bootstrap.css}">
    <SCRIPT language=JAVASCRIPT>
        function chck() {
            var count = 0;
            for (var i = 0; i < form.length; i++)
                if ((form[i].type == "radio") && (form[i].checked))
                    count++;
            if (count == 0) {
                return false;
            } else {
                return true;
            }
        }

        function Add(SourceList, TargetList) {
            var nIndex = SourceList.selectedIndex;
            var nCount = 0;
            if (nIndex == -1) {
                // Process continue only if at least one item selected
                //alert("请先选择一项!");
                return;
            }
            for (i = 0; i < SourceList.length; i++) {
                if (SourceList.options(i).selected == true) {
                    if (inSouceList(SourceList.options(i).value, TargetList) == false) {
                        var objSelected = new Option(SourceList[i].text, SourceList[i].value);
                        TargetList.options[TargetList.length] = objSelected;
                    }
                }
            }
            for (var i = 0; i < TargetList.options.length; i++) {
                TargetList.options(i).selected = true;
            }
            if (navigator.appName == "Netscape") {
                history.go(0)
            }
        }

        function inSouceList(SourceListOption, TargetList) {
            for (i = 0; i < TargetList.length; i++) {
                if (TargetList.options[i].value == SourceListOption) {
                    return true;
                }
            }
            return false;
        }

        function Remove(SelectList) {
            var nIndex = SelectList.selectedIndex;
            var nCount = 0;
            if (nIndex == -1) {
                // Process continue only if at least one item selected
                //alert("请先选择一项!");
                return;
            }
            while (nCount < SelectList.length) {
                if (SelectList.options(nCount).selected == true) {
                    SelectList.options[nCount] = null;
                } else {
                    nCount++;
                }
            }
            if (navigator.appName == "Netscape") {
                history.go(0)
            }
        }

        function enter() {
            var srcEle = window.event.srcElement;
            var tmp;
            tmp = window.showModalDialog("pub_pub.Dialog_Date?vc_input=" + srcEle.value);
            if (tmp.indexOf("/") != -1) {
                srcEle.value = tmp;
            }
            return;
        }

        function check_num() {
            if (window.event.keyCode > 57 || window.event.keyCode < 48) {
                window.event.returnValue = false;
            }
        }

        function check_blank() {
            if (window.event.keyCode < 48) {
                window.event.returnValue = false;
            }
        }

        function check_num_dot() {
            if (window.event.keyCode > 57 || window.event.keyCode < 46) {
                window.event.returnValue = false;
            } else {
                if (window.event.keyCode == 47) {
                    window.event.returnValue = false;
                }
                if (window.event.keyCode == 46) {
                    if (window.event.srcElement.value.indexOf(".") != -1) {
                        window.event.returnValue = false;
                    }
                }
            }
        }

        function submitonce(theform) {
            if (document.all || document.getElementById) {
                for (i = 0; i < theform.length; i++) {
                    var tempobj = theform.elements[i]
                    if (tempobj.type.toLowerCase() == "button")
                        tempobj.disabled = true
                }
            }
        }

        function CheckAll() {
            var i = 0;
            for (i = 0; i < window.document.forms[0].elements.length; i++) {
                if (window.document.forms[0].elements[i].Chk < 3) {
                    if (window.document.forms[0].elements[i].value == "") {
                        alert(window.document.forms[0].elements[i].alt);
                        window.document.forms[0].elements[i].focus();
                        return;
                    } else if (window.document.forms[0].elements[i].Chk == 2) {
                        if (NotNumber(window.document.forms[0].elements[i].value)) {
                            alert("提示信息：\n不是有效的数字，请重新输入。");
                            window.document.forms[0].elements[i].focus();
                            return;
                        }
                    }
                } else if (window.document.forms[0].elements[i].Chk == 3) {
                    if (window.document.forms[0].elements[i].value != "") {
                        if (NotNumber(window.document.forms[0].elements[i].value)) {
                            alert("提示信息：\n不是有效的数字，请重新输入。");
                            window.document.forms[0].elements[i].focus();
                            return;
                        }
                    }
                }
            }
            window.document.forms[0].submit();
            return true;
        }

        function NotNumber(Field) {
            var j = 0;
            var k = 0;
            for (var i = 0; i < Field.length; i++) {
                var ch = Field.substring(i, i + 1);
                if ((ch >= "0") && (ch <= "9")) {
                    j = 0;
                } else if (ch == ".") {
                    k++;
                } else {
                    j = 1;
                    break;
                }
            }
            if ((j == 0) && (k < 2)) {
                return false;
            } else {
                return true;
            }
        }

        function openwindown(page) {
            window.open(page, "newuser", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=700,height=400,left=100,top=150");
        }
    </SCRIPT>

    <META http-equiv=Content-Language content=zh-cn>
    <META http-equiv=Content-Type content="text/html; charset=gb2312">
    <META content="MSHTML 6.00.2900.5626" name=GENERATOR>
    <META content=FrontPage.Editor.Document name=ProgId>
    <LINK
            href="js/style.css" rel=stylesheet>
    <SCRIPT language=javascript>
        function submit_form(theForm, i) {
            var count = 0;
            for (var k = 0; k < theForm.length; k++)
                if ((theForm[k].type == "radio") && (theForm[k].checked))
                    count++;
            if (count == 0) {
                alert("提示信息：\n请选择合同申请。");
                return;
            }
            document.form.p_type.value = i;
            window.document.form.action = "Apply_list_do.asp";
            window.document.form.submit();
            return true;
        }

    </SCRIPT>
</HEAD>
<BODY>
<div id="app">
    <CENTER>
        <FORM name=form action=Apply_list_do.asp method=post>
            <TABLE style="LINE-HEIGHT: 30px" cellSpacing=1 cellPadding=0 width="100%"
                   bgColor=#336699 borderColorLight=#006699 border=0>
                <TBODY>
                <TR>
                    <TD>
                        <TABLE cellSpacing=1 cellPadding=3 width="100%" border=0>
                            <TBODY>
                            <TR bgColor=#ffffff>
                                <TD align=middle width="100%" bgColor=#ffffff colSpan=20
                                    height=22>
                                    <H2><FONT color=#0070c0<B>合同申请一览表</B><IMG alt=帮助
                                                                                     src="img/help_a.gif"
                                                                                     border=0> </FONT></H2></TD>
                            </TR>
                            <!--                        <TR>-->
                            <!--                            <TD align=middle width="100%" bgColor=#ffffff colSpan=9-->
                            <!--                                height=22>-->
                            <!--                                <FORM #000064?-->
                            <!--                                      action="Apply_list.asp name=form><font color="-->
                            <!--                                      method="Post">◆&nbsp;</FONT><FONT color=#000064>首页-->
                            <!--                                    上一页</FONT>&nbsp;<FONT color=#000064>下一页 尾页</FONT><FONT-->
                            <!--                                        color=#000064>&nbsp;共 1 个合同申请 10 个合同申请 /页</FONT><FONT-->
                            <!--                                        color=#000064>&nbsp;页次:<FONT color=blue>1</FONT>/1页</FONT><FONT-->
                            <!--                                        color=#000064>&nbsp;◆&nbsp;</FONT>-->
                            <!--                            </TD>-->
                            <!--                        </TR>-->
                            <TR class=t1>
                                <TD noWrap align=middle>选择</TD>
                                <TD noWrap align=middle>序号</TD>
                                <TD noWrap align=middle>合同申请编号</TD>
                                <TD noWrap align=middle>合同进度</TD>
                                <TD noWrap align=middle>揭示时间</TD>
                                <TD noWrap align=middle>报价总金额（元）</TD>
                            </TR>
                            <TR class=t2 v-for="(contact,index) in searchResult.data">
                                <TD align=middle><INPUT type=radio :value="contact.id"
                                                        v-model="findId" name=p_Applyno></TD>
                                <TD align=middle><A
                                        href="Apply_list_do.html">1<BR></A></TD>
                                <TD align=middle>{{ contact.contAppNum }}<BR></TD>
                                <TD align=middle><A
                                        href="jindulist.html">待审</A><BR></TD>
                                <TD align=middle>{{ contact.planDate }}<BR></TD>
                                <TD align=middle>{{ contact.allSumPrice }}<BR></TD>
                            </TR>
                            </TBODY>
                        </TABLE>
                    </TD>
                </TR>
                </TBODY>
            </TABLE>
            <INPUT
                    type=hidden name=p_type> <INPUT type=hidden value=3 name=p_lx>
            <P align=center><input type="button" value="打开" @click="dakai"/>&nbsp;<input type="button" value="审批"
                                                                                           @click="shenpi"/>&nbsp;<INPUT
                    onclick=" javascript:history.back()" type=button value=返回 name=FLOWLEADShow>
            </P></FORM>
    </CENTER>

    <!--分页插件开始-->
    <paginate :container-class="'pagination'" :page-count="pageCount"
              :click-handler="findPage" :prev-text="'上一页'" :next-text="'下一页'"
              :first-last-button="false" v-model="searchParam.pageNum">
    </paginate>
    <!--分页插件结束-->
</div>
</BODY>


<script>
    Vue.component('paginate', VuejsPaginate)
    var app = new Vue({
        el: "#app",
        data: {
            baseUrl: '/contractApply/',
            searchResult: {//后端响应的结果

            },
            pageCount: 0,//总页数
            searchParam: {//搜索参数
                pageNum: 1,//当前页初始值
                pageSize: 5,//页面容量初始值
            },
            entity: {},//表单实体
            ids: [],//选中要删除的编号
            findId: 0
        },

        methods: {
            //分页查询
            findPage() {
                axios.get('/contractApply/page', {
                    params: this.searchParam
                }).then(result => {
                    this.searchResult = result.data
                    console.log(this.searchResult)
                    //计算总页数
                    this.pageCount = Math.ceil(this.searchResult.total / this.searchParam.pageSize)
                })
            },
            apply(enquireId) {
                sessionStorage.setItem('id', enquireId);
                //获取数据
                const value = sessionStorage.getItem('id');
                console.log(value);
                //跳转到Enquire_bianzhi.html页面
                window.location.href = 'Enquire_bianzhi.html';
            },
            dakai() {
                if (this.findId > 0) {
                    sessionStorage.setItem('contAppId', this.findId);
                    //获取数据
                    const value = sessionStorage.getItem('contAppId');
                    console.log(value);

                    window.document.location = "Apply_list_do2.html";
                } else {
                    alert("请选择合同申请!!!!")
                }
            },
            shenpi() {
                if (this.findId > 0) {
                    sessionStorage.setItem('contAppId', this.findId);
                    //获取数据
                    const value = sessionStorage.getItem('contAppId');
                    console.log(value);

                    window.document.location = "Apply_caiwushenpi2.html";
                } else {
                    alert("请选择合同申请!!!!")
                }
            },

            // 处理选择变化
            handleSelectionChange(id) {
                console.log('Selected ID:', id);
                // 你可以在这里执行其他操作，比如根据ID获取详细信息等
            }
        },
        watch: {
            // 监听 findId 的变化
            findId(newId) {
                this.handleSelectionChange(newId);
            }
        },
        created() {
            this.findPage();
        },

    })
</script>

</HTML>
